var WiderPlanetCryptoJS=WiderPlanetCryptoJS||function(t,e){var i={},r=i.lib={},n=function(){},a=r.Base={extend:function(t){n.prototype=this;var e=new n;return t&&e.mixIn(t),e.hasOwnProperty("init")||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},o=r.WordArray=a.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=e?i:4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var e=this.words,i=t.words,r=this.sigBytes;if(t=t.sigBytes,this.clamp(),r%4)for(var n=0;n>>2]|=(i[n>>>2]>>>24-8*(n%4)&255)<<24-8*((r+n)%4);else if(65535>>2]=i[n>>>2];else e.push.apply(e,i);return this.sigBytes+=t,this},clamp:function(){var e=this.words,i=this.sigBytes;e[i>>>2]&=4294967295<<32-8*(i%4),e.length=t.ceil(i/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var i=[],r=0;r>>2]>>>24-8*(r%4)&255;i.push((n>>>4).toString(16)),i.push((15&n).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>3]|=parseInt(t.substr(r,2),16)<<24-4*(r%8);return new o.init(i,e/2)}},p=s.Latin1={stringify:function(t){var e=t.words;t=t.sigBytes;for(var i=[],r=0;r>>2]>>>24-8*(r%4)&255));return i.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>2]|=(255&t.charCodeAt(r))<<24-8*(r%4);return new o.init(i,e)}},g=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},d=r.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=g.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var i=this._data,r=i.words,n=i.sigBytes,a=this.blockSize,s=n/(4*a),s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0);if(e=s*a,n=t.min(4*e,n),e){for(var c=0;cp;p++){if(16>p)n[p]=0|t[e+p];else{var g=n[p-3]^n[p-8]^n[p-14]^n[p-16];n[p]=g<<1|g>>>31}g=(r<<5|r>>>27)+c+n[p],g=20>p?g+((a&o|~a&s)+1518500249):40>p?g+((a^o^s)+1859775393):60>p?g+((a&o|a&s|o&s)-1894007588):g+((a^o^s)-899497514),c=s,s=o,o=a<<30|a>>>2,a=r,r=g}i[0]=i[0]+r|0,i[1]=i[1]+a|0,i[2]=i[2]+o|0,i[3]=i[3]+s|0,i[4]=i[4]+c|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=Math.floor(i/4294967296),e[(r+64>>>9<<4)+15]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(e),t.HmacSHA1=r._createHmacHelper(e)}();var wptg_tagscript_history=wptg_tagscript_history||{history_peak:{},history_ty:{},ty_grade:{Home:1,Item:2,Cart:3,PurchaseComplete:4,Wish:4},ty_isola:{Login:1,Join:2}},wptg_tagscript=wptg_tagscript||{isIdle:!0,tk_param:"&",tk_keyvalue:"=",tk_set:"&",rqData:[],ti:"",eid:"",isIgnoreStorage:!1,exec:function(t){t&&(this.eid=t),"object"==typeof wptg_tagscript_vars&&!function(){var t=function(t,e){for(var i=t.length>>>0,r=0;r2&&(r=r.toLowerCase(),r="purchasecomplete"===r?"PurchaseComplete":r.substring(0,1).toUpperCase()+r.substring(1,r.length)),parseInt(n)!=n&&parseInt(a)!=a)continue;var c=""+a,p=""+n+"_"+c;if(!wptg_tagscript_history.ty_grade.hasOwnProperty(r)&&!wptg_tagscript_history.ty_isola.hasOwnProperty(r))continue;if(wptg_tagscript_history.history_ty.hasOwnProperty(p)&&t(wptg_tagscript_history.history_ty[p],r)>0)continue;if(wptg_tagscript_history.ty_grade.hasOwnProperty(r)){if(wptg_tagscript_history.history_peak.hasOwnProperty(p)&&wptg_tagscript_history.ty_grade[r]<=wptg_tagscript_history.history_peak[p])continue;wptg_tagscript_history.history_peak[p]=wptg_tagscript_history.ty_grade[r]}wptg_tagscript_history.history_ty.hasOwnProperty(p)||(wptg_tagscript_history.history_ty[p]=[]),wptg_tagscript_history.history_ty[p].push(r);var g={ty:r};n&&(g.ti=n),a&&(g.tx=a),o&&(g.wpiad=o),s&&(g.os=s),i.wp_hcuid=i.wp_hcuid?i.wp_hcuid.replace(/^\s+/,"").replace(/\s+$/,""):"";var d=/[\s]/g;if(i.wp_hcuid.length>2&&0==d.test(i.wp_hcuid)&&""!=i.wp_hcuid&&"undefined"!=typeof i.wp_hcuid&&i.wp_hcuid+""!="0"&&(i.wp_hcuid=WiderPlanetCryptoJS.SHA1(i.wp_hcuid),g.hcuid=i.wp_hcuid),0<=t(["Item","Cart","PurchaseComplete","Join","Wish"],r)&&"object"==typeof i.items){var h=0;for(item_idx in i.items)if(i.items.hasOwnProperty(item_idx)){var u=["i","p","q","t","u","b","ti"],_=i.items[item_idx];for(vidx in u)_.hasOwnProperty(u[vidx])&&(g[""+u[vidx]+h]=_[u[vidx]]);h++}}i.device&&(g.device=i.device);var l=i.extra_params;for(var f in l)g[f]=l[f];wptg_tagscript.rqData.push(g)}}(e)}(),this.observe()},getEvents:function(t,e){try{var i=1,r={time:0,wh:[],scroll:[]};r.wh.push((window.innerWidth||"0")+"x"+(window.innerHeight||"0")),window.addEventListener("beforeunload",function(i){var n=new Image;n.src="https://altg.widerplanet.com/delivery/info?type=events&s="+encodeURIComponent(JSON.stringify(r))+"&wp_uid="+encodeURIComponent(t||"")+"&tc="+e}),window.addEventListener("blur",function(t){i=!1}),window.addEventListener("focus",function(t){i=!0}),setInterval(function(){if(i)try{r.time++;var t=parseInt(100*(window.scrollY+window.innerHeight)/document.body.scrollHeight),e=0;t<=25?e=0:t>25&&t<=50?e=1:t>50&&t<=75?e=2:t>75&&(e=3);var n=r.scroll.length;0!==n&&r.scroll[n-1]==e||r.scroll.push(e)}catch(a){}},1e3),window.addEventListener("resize",function(t){r.wh[1]=(window.innerWidth||"0")+"x"+(window.innerHeight||"0")})}catch(n){}},escp:function(t){return"string"==typeof t?encodeURIComponent(t):""},filterValue:function(t){t=""+t;var e=new RegExp(wptg_tagscript.tk_param,"g"),i=t.replace(e," ");return i=i.replace(new RegExp(wptg_tagscript.tk_keyvalue,"g")," "),i=i.replace(new RegExp(wptg_tagscript.tk_set,"g")," ")},trigger:function(){var t=document.getElementById("wp_tg_cts"),e=[],i=wptg_tagscript.rqData;if(wptg_tagscript.rqData=[],0!=i.length){if(!wptg_tagscript.isIdle)return void wptg_tagscript.observe();for(wptg_tagscript.isIdle=!1;rqDataRow=i.shift();){var r=[];for(var n in rqDataRow)r.push(n+wptg_tagscript.tk_keyvalue+this.escp(wptg_tagscript.filterValue(rqDataRow[n]))),"ti"===n&&(wptg_tagscript.ti=rqDataRow[n]);e.push(r.join(wptg_tagscript.tk_param));break}wptg_tagscript.rqData=i;var a=e.join(wptg_tagscript.tk_set),o="https://astg.widerplanet.com/delivery/wpc.php?v=1&ver=4.0&r=1&md=bs",s=this.eid||this.getCookie("_wp_uid"),c=this.getCookie("_ga");""!==c&&"GA"===c.substring(0,2)&&(c=c.substring(2,c.length).split("."),4===c.length&&/[0-9]/.test(c[0])&&c[1]&&/^[0-9]+$/.test(c[1])&&c[2]&&/^[0-9]+$/.test(c[2])&&c[3]&&/^[0-9]+$/.test(c[3])&&(c[2]=parseFloat(c[2]).toString(32),c[3]=parseFloat(c[3]).toString(32),c=c.reverse().join("-"),o+="&ga="+c)),s&&(o+="&wp_uid="+encodeURIComponent(s));var p=(new Date).getTime();o+="&"+a,o+=document.charset?"&charset="+document.charset:parent.document.characterSet?"&charset="+parent.document.characterSet:"",o+="&tc="+p,document.referrer&&(o+="&ref="+this.escp(document.referrer)),document.location.href&&(o+="&loc="+this.escp(document.location.href)),o&&document.createElement&&null!=t&&(this.loadScript({id:"wp_tag_script_"+(new Date).getTime(),js:o,dom:t},function(){}),setTimeout(function(){wptg_tagscript.setIdle()})),17479==this.ti&&this.getEvents(s,p)}},setIdle:function(){wptg_tagscript.isIdle=!0,wptg_tagscript.observe()},observe:function(){wptg_tagscript.isIdle?wptg_tagscript.trigger():setTimeout(wptg_tagscript.observe,1)},getCookie:function(t){for(var e=t+"=",i=document.cookie.split(";"),r=0;r10)return}var i="https://astg.widerplanet.com";window.addEventListener("message",function(t){new Image;try{if(i!==t.origin)return;var e=t.data;e._wp_uid&&localStorage.setItem("_wp_uid",encodeURIComponent(e._wp_uid))}catch(r){}},!1);var r=window.document.getElementById("wp_tg_cts");t(i+"/delivery/storage")}catch(n){}}};if("undefined"==typeof wptg_tagscript_exec_auto||wptg_tagscript_exec_auto)try{var is_local_storage=wptg_tagscript.isLocalStorageAvailable(),_wp_uid="";is_local_storage&&(_wp_uid=wptg_tagscript.getStorageId(),wptg_tagscript.loadStorage()),wptg_tagscript.exec(_wp_uid)}catch(e){}